package wlt.domain;

import org.casbin.jcasbin.main.Enforcer;

/**
 * @author wuliting
 * @date 2021/11/5
 * 请求类
**/
public class Request {
    private String sub; //主体
    private String obj; //操作的对象
    private String act; //行为

    public Request(String sub, String obj, String act) {
        this.sub = sub;
        this.obj = obj;
        this.act = act;
    }

    public boolean isAllowed(Enforcer enforcer) {
        return enforcer.enforce(sub,obj,act);
    }
}
